Skip to content

test(application): drop artifact count check in verbose list test - #725

Merged
olivermeyer merged 1 commit into
mainfrom
test/remove-artifact-count-assertion
Sep 25, 2026
Merged

olivermeyer merged 1 commit into
mainfrom
test/remove-artifact-count-assertion

Conversation

@olivermeyer

Copy link
Copy Markdown
Collaborator

Why?
The hourly production test test_cli_application_list_verbose fails since the HETA 2.0.0 release (run). The test checked for the text Artifacts: 1 input(s), 6 output(s) anywhere in the output. Only old test-app versions had 6 outputs, and the CI account no longer sees those versions.

How?
This PR removes that one assertion. The test still checks the exit code, the application IDs and the version numbers. We do not replace it with a version-specific count check, because the exact count is platform data and not CLI behavior.

🤖 Generated with Claude Code

The assertion matched any version with 6 outputs. Only old test-app
versions had 6 outputs, and the CI account no longer sees them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@olivermeyer olivermeyer added the skip:test:long_running Skip long-running tests (≥5min) label Sep 25, 2026
@olivermeyer
olivermeyer marked this pull request as ready for review September 25, 2026 07:00
@olivermeyer
olivermeyer requested a review from a team as a code owner September 25, 2026 07:00
@claude

claude Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

PR Review: test(application): drop artifact count check in verbose list test

Reviewing this test change for the medical device SDK...

Review Checklist

  • Read repository documentation (CLAUDE.md, .github/CLAUDE.md, tests/CLAUDE.md)
  • Review changed file and understand the modification
  • Check git diff for exact changes
  • CRITICAL: Verify test has proper markers (unit/integration/e2e)
  • CRITICAL: Check for unmarked tests in the repository
  • CRITICAL: Run linting (make lint)
  • CRITICAL: Verify conventional commit format
  • Analyze if the change is appropriate for medical device software
  • Check if documentation updates needed
  • Post comprehensive review findings
  • Apply verdict label (claude:review:passed or claude:review:failed)

✅ CRITICAL CHECKS - ALL PASSED

1. Test Markers ✅

@pytest.mark.e2e          # ✅ Required category marker
@pytest.mark.scheduled     # ✅ Runs in scheduled pipeline
@pytest.mark.timeout(timeout=60)  # ✅ Appropriate timeout
def test_cli_application_list_verbose(runner: CliRunner, record_property) -> None:

Verification:

  • Test has required e2e marker
  • Properly categorized as scheduled (runs hourly against production)
  • No unmarked tests found in the file (0 tests matched "not unit and not integration and not e2e")

2. Code Quality ✅

✅ ruff check . - All checks passed!
✅ ruff format --check . - 284 files already formatted
✅ pyright - 0 errors, 0 warnings, 0 informations
✅ mypy - Success: no issues found in 84 source files

3. Conventional Commits ✅

test(application): drop artifact count assertion from verbose list test
  • ✅ Type: test (valid)
  • ✅ Scope: application (correct module)
  • ✅ Description: Clear and descriptive

4. Coverage Impact ✅

  • No coverage degradation: Only removes one assertion, test still validates CLI behavior
  • Test still checks: exit code, application IDs, version numbers

📋 REVIEW FINDINGS

Change Analysis

What was removed:

- assert "Artifacts: 1 input(s), 6 output(s)" in normalize_output(result.output)

Why this is appropriate:

  1. Platform Data vs CLI Behavior: The assertion checked for a specific artifact count (6 outputs), which is platform data that changes when application versions are deployed, NOT CLI behavior that the test should validate.

  2. Root Cause: After HETA 2.0.0 release, the CI account no longer sees old application versions with 6 outputs, causing scheduled tests to fail (run 36103152940).

  3. Test Intent Preserved: The test still validates what matters for CLI functionality:

    • ✅ Exit code 0 (command succeeds)
    • ✅ Application IDs present (HETA, TEST)
    • ✅ Version numbers present (verbose output works)
  4. Best Practice: Testing behavior (CLI lists applications with details) rather than implementation details (specific artifact counts from platform).

What Still Gets Tested

assert result.exit_code == 0
assert HETA_APPLICATION_ID in normalize_output(result.output)
assert HETA_APPLICATION_VERSION in normalize_output(result.output)
assert TEST_APPLICATION_ID in normalize_output(result.output)
assert TEST_APPLICATION_VERSION in normalize_output(result.output)

This validates:

  • CLI command execution
  • Verbose output format (includes versions)
  • Data retrieval from platform

🎯 ARCHITECTURAL COMPLIANCE

✅ No concerns - This is a test-only change with no impact on:

  • Module boundaries
  • Service layer
  • API contracts
  • Breaking changes

📚 DOCUMENTATION

✅ No updates needed - Test change is self-documenting. The PR description clearly explains the rationale.


🔒 SECURITY & MEDICAL DEVICE CONSIDERATIONS

✅ No concerns:

  • Test-only change
  • No impact on medical data handling
  • No impact on compliance reporting
  • Scheduled tests will now pass in production environment

💡 SUGGESTIONS (Non-blocking)

None - This is a clean, focused fix that:

  • Removes brittle assertion on dynamic platform data
  • Preserves CLI behavior validation
  • Follows testing best practices
  • Has clear rationale in PR description

✅ VERDICT

All blocking checks passed:

  • ✅ Test markers correct (e2e, scheduled)
  • ✅ Linting passes (ruff, pyright, mypy)
  • ✅ Conventional commit format
  • ✅ Change is appropriate and well-justified
  • ✅ Test coverage maintained

Verdict: ✅ claude:review:passed

Excellent work! This is exactly the right fix - removing a brittle assertion on dynamic platform data while preserving the CLI behavior validation. The PR description clearly explains the issue and rationale.

View job run

@claude claude Bot added the claude:review:passed Automated Claude PR review found no blocking issues on the current head commit label Sep 25, 2026
@olivermeyer
olivermeyer enabled auto-merge (rebase) September 25, 2026 07:21
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

❌ Your project status has failed because the head coverage (64.42%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.
see 23 files with indirect coverage changes

@sonarqubecloud

Copy link
Copy Markdown

@olivermeyer
olivermeyer merged commit 9e0e6f1 into main Sep 25, 2026
29 of 31 checks passed
@olivermeyer
olivermeyer deleted the test/remove-artifact-count-assertion branch September 25, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude:review:passed Automated Claude PR review found no blocking issues on the current head commit skip:test:long_running Skip long-running tests (≥5min)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants